<?php
if(!defined('ADMINPX') || !defined('ADMIN')) {
	exit('Access Denied');
}
function show($varName) {
    switch ($result = get_cfg_var($varName)) {
        case 0:
            return '<em>×</em>';
            break;

        case 1:
            return '<b>√</b>';
            break;

        default:
            return $result;
            break;
    }
}
function isfun($funName = '') {
    if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\_]+~i', $funName,
        $tmp))
        return '错误';
        return (false !== function_exists($funName)) ? '<b>√</b>' : '<em>×</em>';
}
function isfun1($funName = '') {
    if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\_]+~i', $funName,$tmp))
        return '错误';
    if(function_exists($funName)){
    	  return '√';
    }else{
    	  return '×';
    }
}

?>
</div>
<div class="admin_a"><b>服务器域名&nbsp;&nbsp;： </b>
<?php echo $_SERVER['SERVER_NAME'];?></br>
</div>
<div class="admin_a"><b>服务器IP地址</b>：
<?php if('/'==DIRECTORY_SEPARATOR){echo $_SERVER['SERVER_ADDR'];}else{echo @gethostbyname($_SERVER['SERVER_NAME']);} ?>
</div>
<div class="admin_a"><b>你的IP地址是：</b>
<?php echo @$_SERVER['REMOTE_ADDR'];?></br>
</div>
<div class="admin_a"><b>服务器语言&nbsp;&nbsp;：</b>
<?php echo getenv("HTTP_ACCEPT_LANGUAGE");?>
</div>
<div class="admin_a"><b>服务器标识&nbsp;&nbsp;：</b>
<?php if($sysInfo['win_n'] != ''){echo $sysInfo['win_n'];}else{echo @php_uname();};?>
</div>
<div class="admin_a"><b>服务器操作系统：</b>
<?php $os = explode(" ", php_uname()); echo $os[0];?>
</div>
<div class="admin_a"><b>服务器解译引擎：</b>
<?php echo $_SERVER['SERVER_SOFTWARE'];?>
</div>
<div class="admin_a"><b>脚本占用最大内存：</b>
<?php echo show("memory_limit");?>
</div>
<div class="admin_a"><b>POST提交最大限制：</b>
<?php echo show("post_max_size");?>
</div>
<div class="admin_a"><b>上传文件最大限制：</b>
<?php echo show("upload_max_filesize");?>
</div>
<div class="admin_a"><b>PHP&nbsp;版&nbsp;本&nbsp;&nbsp;：</b>
<?php echo PHP_VERSION;?>
</div>
<div class="admin_a"><b>MySQL数据库：</b>
<?php echo mysql_get_client_info();?>
<?php
/*   
    if(function_exists("mysql_get_server_info")){
        $s = @mysql_get_server_info();
        $s = $s ? '&nbsp; mysql_server 版本：'.$s : '';
	      $c = '&nbsp; mysql_client 版本：'.@mysql_get_client_info();
        echo $s ? $s : $c;
    }
*/?>
</div>

<!--函数检测-->
<div class="admin_a">
	<b>函数检测</b>
<form action="admin.php?action=php" method="POST" >
<input type="text" name="funName" size="50" placeholder="请输入您要检测的函数" />
<input type="submit" name="act" value="函数检测" />
</form>
</div>
  <?php
  if ($_POST['act'] == '函数检测') {
    $funRe = "函数" . $_POST['funName'] . "支持状况检测结果：" . isfun1($_POST['funName']);
  	echo "<script>alert('$funRe');</script>";
  }
  ?>
<div class="admin_a">
	<a href="admin.php?">返回后台首页</a>
</div>
